<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
  <!ENTITY dc "http://purl.org/dc/elements/1.1/">
  <!ENTITY dcterms "http://purl.org/dc/terms/">
  <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
  <!ENTITY a "http://xmlns.heustics.org/schema/myelin/0.1/">
  <!ENTITY m "http://xmlns.heustics.org/ontology/myelin/0.1/">
]>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:date="http://exslt.org/dates-and-times"  
  xmlns:l="http://xmlns.heustics.org/schema/i18n/0.1/"  
  xmlns:a="&a;" 
  xmlns:o="&a;Document#edit"
  exclude-result-prefixes="xsl a l date o"
> 
  <xsl:variable name="o:l10n" select="a:get-l10n('&a;Document#edit')"/> 
  <xsl:variable name="o:params-l10n" select="$o:l10n/l:context[@name='params']/*"/>    
  <xsl:variable name="o:hints-l10n" select="$o:l10n/l:context[@name='param-hints']/*"/>
  
  <xsl:template match="a:tag|a:created|a:modified|a:creator|a:last-modifier|a:translations|a:original" mode="a:input-hidden"/>   
  <xsl:template match="a:translations|a:original" mode="a:input-show"/>
    
  <xsl:template match="a:form[@msg]" mode="a:form-header" name="a:form-header">
    <xsl:param name="l10n" select="$o:l10n/l:context[@name='form-msg']"/>
    <xsl:param name="msg-key" select="@msg"/>
    <xsl:param name="msg" select="$l10n/*[@key=$msg-key]"/>
    <xsl:choose>
      <xsl:when test="$msg">
        <div class="entry msg">      
          <span><xsl:value-of select="$msg"/></span>
          <div class="spacer"/>
        </div>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-imports/>
      </xsl:otherwise>    
    </xsl:choose>
  </xsl:template>  
  
  <xsl:template match="a:tag" mode="a:input-show" name="a:tag-input-show">
    <xsl:param name="tag" select="."/>
    <div class='input output tag'>  
      <div class="key">
        <div class='label'>
          <span><xsl:value-of select="$o:params-l10n[@key='tag']"/></span>
          <div class="spacer"/>
        </div>
        <div class='hint'>
          <xsl:call-template name="a:input-hints">
            <xsl:with-param name="hint" select="$o:hints-l10n[@key='tag']"/>
          </xsl:call-template>
          <div class="spacer"/>
        </div>
        <div class="spacer"/>
      </div>      
      <div class='value'>
        <div class="entry text">
          <span><xsl:value-of select="$tag"/></span>
        </div>        
        <div class="spacer"/>
      </div>
      <div class='spacer'/>
    </div>
  </xsl:template>
  
</xsl:stylesheet>

